package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.Dept;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description: tpm_stock_ck_apply
 * @Author: jeecg-boot
 * @Date:   2021-10-14
 * @Version: V1.0
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_STOCK_CK_APPLY")
@Schema(description="出库申请")
public class EquipmentStockCkApply extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**id*/
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;
	/**isDel*/
    @Column(name = "IS_DEL_")
    @Schema(description = "是否删除")
    private Integer isDel;
	/**版本*/
    @Column(name = "VERSION_")
    @Schema(description = "版本")
    private Integer version;
	/**出库单号*/
    @Column(name = "CODE_")
    @Schema(description = "出库单号")
    private String code;
//	/**部门*/
//    @Excel(name = "部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
//    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
//    @ApiModelProperty(value = "部门")
//    private String departmentId;
	/**厂区*/
    @Dict(dicCode = "ERP_EQUIPMENT_FACTORY")
    @Column(name = "FACTORY_")
    @Schema(description = "厂区")
    private String factory;
	/**单据状态*/
    @Dict(dicCode = "ERP_EQUIPMENT_RK_STATUS")
    @Column(name = "STATUS_")
    @Schema(description = "单据状态")
    private Integer status;
	/**申请人*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    @Column(name = "APPLY_USER_ID_")
    @Schema(description = "申请人")
    private String applyUserId;
	/**仓库*/
    @Dict(dicEntity = EquipmentStock.class, dicText = "stockName", dicCode = "id")
    @Column(name = "STOCK_ID_")
    @Schema(description = "仓库")
    private String stockId;
	/**领料部门*/
    @Dict(dicEntity = Dept.class, dicText = "deptName", dicCode = "id")
    @Column(name = "TAKE_DEPARTMENT_ID_")
    @Schema(description = "领料部门")
    private String takeDepartmentId;
	/**领料人*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    @Column(name = "TAKE_PERSON_ID_")
    @Schema(description = "领料人")
    private String takePersonId;
    /**用途*/
    @Dict(dicCode = "ERP_EQUIPMENT_APPLICATION")
    @Column(name = "APPLICATION_")
    @Schema(description = "用途")
    private String application;

    @Column(name = "ORDER_CODE_")
    @Schema(description = "关联工单编码")
    private String orderCode;
}
